package com.ouran.model.information;

import java.io.Serializable;
import java.sql.Timestamp;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * 文章资讯表实体类
 * @version 1.0
 * Date 2018/09/17
 * 
 */

@Entity
@Table(name="information") //映射information表
public class Information implements Serializable{

	/**
	 * 使用redis存对象，一定要让实体类实现Serializable接口，否则会报错。
	 */
	private static final long serialVersionUID = 1L;
	
	private int id;          //自增长id
	private String autor;         //文章作者
	private String article;      //文章内容
	private Timestamp t_time;      
	
	@Transient
	private String imgBase64;      //用于列表缩略图展示
	@Transient
	private String title;      //用于列表缩略图title
	@Transient
	private String content;      //用于列表缩略内容
	
	@Id
	@GeneratedValue
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getAutor() {
		return autor;
	}
	public void setAutor(String autor) {
		this.autor = autor;
	}
	public String getArticle() {
		return article;
	}
	public void setArticle(String article) {
		this.article = article;
	}
	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	public Timestamp getT_time() {
		return t_time;
	}
	public void setT_time(Timestamp t_time) {
		this.t_time = t_time;
	}
	public String getImgBase64() {
		return imgBase64;
	}
	public void setImgBase64(String imgBase64) {
		this.imgBase64 = imgBase64;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	@Override
	public String toString() {
		return "Information [id=" + id + ", autor=" + autor + ", article=" + article + ", t_time=" + t_time
				+ ", imgBase64=" + imgBase64 + ", title=" + title + ", content=" + content + "]";
	}
	
	
}
